#include "I_BaseLib.h"

union float_container
{
	float f;
	unsigned char b[4];
};

//IEEE	1		8			23		LSB
//		sign	exponent	fraction
float GetFraction(float f)
{
	int temp;
	temp =(int) f;
	f -=temp;
	return f;
}

//on intel shit (little endian nightmare)
float Get_MS_8Bits(float f)
{
	float_container floattemp;
	floattemp.f = f;
	floattemp.b[0] = 0;
	floattemp.b[1] = 0;
	return floattemp.f;
}

float Invert_LS_8Bits(float f)
{
	float_container floattemp;
	floattemp.f = f;
	floattemp.b[0] = 0xff;
	floattemp.b[1] = 0xff;
	floattemp.b[2] = ~floattemp.b[2];
	return floattemp.f;
}


